package com.dyrj.component;


import com.dyrj.DyrjApplication;
import com.dyrj.base.system.task.service.SysTaskService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;


@Component
@Order(1)
public class TaskJobRunnerInit implements CommandLineRunner {

    private static final Logger log = LoggerFactory.getLogger(DyrjApplication.class);

    @Resource
    private SysTaskService sysTaskService;

    @Override
    public void run(String... args) throws Exception {
        log.debug("TaskJobRunnerInit...");
        sysTaskService.initTaskJobs();
    }
}